﻿$(document).ready(function () {
	$("form.paypal-button button").text(window.Resources.RechargeThroughPayPal);
	$("form.paypal-button button").click(function (e) {
		var amount = parseInt($("#RefillAmount").val());
		if (amount > 0) {
			$("form.paypal-button input[name='amount']").val($("#RefillAmount").val());
		} else {
			e.preventDefault();
			alert("Enter valid amount.");
		}
	});
	$("#withdrawalShow").click(function () {
	    if ($("#personalInfoRequired").length == 0 && $("#noManyForWithdrawal").length == 0) {
	        $("#withdrawalPanel").show();
	    }
	    else {
	        if ($("#personalInfoRequired").length != 0)
	            $("#personalInfoRequired").show();
	        else
	            if ($("#noManyForWithdrawal").length != 0)
	                $("#noManyForWithdrawal").show();
	    }
	});
});